<template>
  <div>
    <van-nav-bar
      :title="title"
      left-arrow
      @click-left="$router.go(-1)"
      @click-right="clickRight"
      :right-text="rightText"
    ></van-nav-bar>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: "列表页"
    },
    rightText: {
      type: String,
      default: "管理"
    }
  },
  methods: {
    clickRight() {
      this.$emit("clickRight");
    }
  }
};
</script>

<style lang="less" scoped>
.van-nav-bar {
  height: 65px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  background-image: linear-gradient(90deg, #4fdace 0, #4addbd 30%, #45dfab 100%),
    linear-gradient(#fff, #fff);
  .van-icon-arrow-left,
  &__title {
    line-height: 65px;
    color: #fff;
    font-size: 20px;
  }
  &__text{
    color: #fff;
    line-height: 65px;
    font-size: 16px;

  }
}
</style>